package com.qupeng.demo.kafka.kafkaapache.security;

import org.apache.kafka.common.security.auth.AuthenticationContext;
import org.apache.kafka.common.security.auth.KafkaPrincipal;
import org.apache.kafka.common.security.authenticator.DefaultKafkaPrincipalBuilder;
import org.apache.kafka.common.security.kerberos.KerberosShortNamer;
import org.apache.kafka.common.security.ssl.SslPrincipalMapper;

public class CustomizedPrincipalBuilder extends DefaultKafkaPrincipalBuilder {
    /**
     * Construct a new instance.
     *
     * @param kerberosShortNamer Kerberos name rewrite rules or null if none have been configured
     * @param sslPrincipalMapper SSL Principal mapper or null if none have been configured
     */
    public CustomizedPrincipalBuilder(KerberosShortNamer kerberosShortNamer, SslPrincipalMapper sslPrincipalMapper) {
        super(kerberosShortNamer, sslPrincipalMapper);
    }

    @Override
    public KafkaPrincipal build(AuthenticationContext context) {
        return null;
    }
}
